import Vue from 'vue';
import 'normalize.css/normalize.css'; // A modern alternative to CSS resets
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import locale from 'element-ui/lib/locale/lang/zh-CN'; // lang i18n
import '@/styles/index.scss'; // global css
import App from './App';
import store from './store';
import router from './router';
import '@/icons'; // icon
import ajax from './utils/request.js';
import './styles/public.css';
import Print from 'vue-print-nb';
import VueClipboard from 'vue-clipboard2';
import * as echarts from 'echarts';
import htmlToPdf from './utils/htmlToPdf';
import VueBarcode from 'vue-barcode';
import reko_rfid from 'reko_rfid';

Vue.use(reko_rfid);
Vue.component('barcode', VueBarcode);
Vue.use(htmlToPdf);
Vue.use(VueClipboard);
Vue.use(Print);
Vue.prototype.$get = ajax.get;
Vue.prototype.$post = ajax.post;
Vue.prototype.$pcget = ajax.pcget;
Vue.prototype.$pcpost = ajax.pcpost;
Vue.prototype.$downloadpost = ajax.downloadpost;
Vue.prototype.$echarts = echarts;

// // 正式服接口
// Vue.prototype.$api = 'https://rk.shouhuojiyun.com/customer';
// // Vue.prototype.$api = 'http://crm_temp.shouhuojiyun.com/customer';//正式服的临时地址
// Vue.prototype.$master = 'https://rk.shouhuojiyun.com/master';
// Vue.prototype.$rknew = 'https://rk.shouhuojiyun.com/rknew';
// Vue.prototype.$otherApi = 'https://rk.shouhuojiyun.com/otherApi';
// Vue.prototype.$bussapi = 'https://rk.shouhuojiyun.com/rk_bussiness/';

//测试服接口
//Vue.prototype.$api = 'http://localhost/book';
Vue.prototype.$api = 'http://82.157.180.170/book';
Vue.prototype.$url = 'http://82.157.180.170';
//Vue.prototype.$api = 'http://localhost:5068';
// Vue.prototype.$api = 'http://47.106.34.163:9056';//测试服的临时地址
// Vue.prototype.$master = 'http://47.106.175.214:8018';
// Vue.prototype.$rknew = 'http://c.shouhuojiyun.com';
// Vue.prototype.$otherApi = 'https://rk.shouhuojiyun.com/otherApi';
// Vue.prototype.$bussapi = 'https://robot.shouhuojiyun.com/rk_bussiness/';

// Vue.prototype.$rkapi = 'https://rk.shouhuojiyun.com/rkapi';
 

// set ElementUI lang to EN
Vue.use(ElementUI, {
  locale
});
if (module.hot) {
  module.hot.accept();
}
Vue.config.productionTip = false;
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
});
